
using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using MydisDatas;

public class HerbContorl : MonoBehaviour, IPointerClickHandler
{
    public Toggle Item1;
    public Toggle Item2;
    public Text _PrefabsPage;
    public GameObject _MainPrefabs;
    public int PageNumber = 1;

    public static HerbContorl Instance;
    
    private void Awake()
    {
        Instance = this;
        
    }

    void Update()
     {
         _PrefabsPage.text = PageNumber.ToString();
     }

     public void OpenDiseadBook()
    {
        Item1.isOn = true;
        Item2.isOn = false;
        PageNumber = 1;
    }

    public void OnPointerClick(PointerEventData eventData)
    {
        Destroy(_MainPrefabs.gameObject);
    }

    public void OnOpenHer(bool open)
    {
        PageNumber = 1;
    }
    
}
